package ro.unibuc.nautilus.domain;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * 
 * Public getters and setters to access all possible fields of s Ship
 * no matter what kind of Ship
 * @author Luiza
 *
 */
public class ShipHolder {
	
	public Ship ship;

	public String getName() {
		return ship.getName();
	}

	public void setName(String name) {
		this.ship.setName(name);
	}

	public double getTotalCapacity() {
		return ship.getTotalCapacity();
	}

	public void setTotalCapacity(double totalCapacity) {
		this.ship.setTotalCapacity(totalCapacity);
	}

	public double getPayload() {
		return ship.getPayload();
	}

	public void setPayload(double payload) {
		this.ship.setPayload(payload);
	}

	public double getLength() {
		return ship.getLength();
	}

	public void setLength(double length) {
		this.ship.setLength(length);
	}

	public double getDraft() {
		return ship.getDraft();
	}

	public void setDraft(double draft) {
		this.ship.setDraft(draft);
	}

	public double getSpeed() {
		return ship.getSpeed();
	}

	public void setSpeed(double speed) {
		this.ship.setSpeed(speed);
	}

	public String getFuel() {
		return ship.getFuel();
	}

	public void setFuel(String fuel) {
		this.ship.setFuel(fuel);
	}

	public String getShipType() {
		return ship.getShipType();
	}

	public void setShipType(String type) {
		this.ship.setShipType(type);
	}

	public Harbour getBaseHarbour() {
		return ship.getBaseHarbour();
	}

	public void setBaseHarbour(Harbour baseHarbour) {
		this.ship.setBaseHarbour(baseHarbour);
	}

	public Harbour getRegistrationHarbour() {
		return ship.getRegistrationHarbour();
	}

	public void setRegistrationHarbour(Harbour registrationHarbour) {
		this.ship.setRegistrationHarbour(registrationHarbour);
	}

	public Set<Repair> getRepairments() {
		return ship.getRepairments();
	}

	public void setRepairments(Set<Repair> repairments) {
		this.ship.setRepairments(repairments);
	}

	public Date getLocationReportDate() {
		return ship.getLocationReportDate();
	}

	public void setLocationReportDate(Date locationReportDate) {
		this.ship.setLocationReportDate(locationReportDate);
	}

	public Harbour getLastLocation() {
		return ship.getLastLocation();
	}

	public void setLastLocation(Harbour lastLocation) {
		this.ship.setLastLocation(lastLocation);
	}
	
	public String getTransportType() {
		if (ship instanceof Cargo) {
			return ((Cargo) ship).getTransportType();
		}
		return null;
	}

	public void setTransportType(String transportType) {
		if (ship instanceof Cargo) {
			((Cargo) ship).setTransportType(transportType);
		}
	}

	public int getNumberOfCranes() {
		if (ship instanceof Cargo) {
			return ((Cargo) ship).getNumberOfCranes();
		}
		return 0;
	}

	public void setNumberOfCranes(int numberOfCranes) {
		if (ship instanceof Cargo) {
			((Cargo) ship).setNumberOfCranes(numberOfCranes);
		}
	}
	
	public String getFuelType() {
		if (ship instanceof Tanker) {
			return ((Tanker) ship).getFuelType();
		}
		return null;
	}

	public void setFuelType(String fuelType) {
		if (ship instanceof Tanker) {
			((Tanker) ship).setFuelType(fuelType);
		}
	}
	public String getConfortClass() {
		if (ship instanceof CruiseShip) {
			return ((CruiseShip) ship).getConfortClass();
		}
		return null;
	}

	public void setConfortClass(String confortClass) {
		if (ship instanceof CruiseShip) {
			((CruiseShip) ship).setConfortClass(confortClass);
		}
	}

	public int getPassengersFirstClass() {
		if (ship instanceof CruiseShip) {
			return ((CruiseShip) ship).getPassengersFirstClass();
		}
		return 0;
	}

	public void setPassengersFirstClass(int passengersFirstClass) {
		if (ship instanceof CruiseShip) {
			((CruiseShip) ship).setPassengersFirstClass(passengersFirstClass);
		}
	}

	public int getPassengersTouristClass() {
		if (ship instanceof CruiseShip) {
			return ((CruiseShip) ship).getPassengersTouristClass();
		}
		return 0;
	}

	public void setPassengersTouristClass(int passengersTouristClass) {
		if (ship instanceof CruiseShip) {
			((CruiseShip) ship).setPassengersTouristClass(passengersTouristClass);
		}
	}	
	
}
